package com.example.mybatis_puls.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @TableId(type = IdType.AUTO)
    private  int iduser;
    private String name;
    private String password;
    private int score;
    //新增时添加
    @TableField(fill = FieldFill.INSERT)
    private Date insertTime;
    //新增和修改时添加
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableField(fill = FieldFill.INSERT)
    @Version
    private int version;
}
